package com.igeekhome.mapper;

import com.igeekhome.pojo.SysRole;
import com.igeekhome.pojo.SysRoleExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysRoleMapper {
    int countByExample(SysRoleExample example);

    int deleteByExample(SysRoleExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(SysRole record);
    
    /**
    * @Description 增添员工角色
    * @Param [staffId, roleId] 员工id 角色id
    * @Return int
    **/
    int insertstaffRole(Integer staffId, Integer roleId);

    int insertSelective(SysRole record);

    List<SysRole> selectByExampleWithBLOBs(SysRoleExample example);

    List<SysRole> selectByExample(SysRoleExample example);

    SysRole selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") SysRole record, @Param("example") SysRoleExample example);

    int updateByExampleWithBLOBs(@Param("record") SysRole record, @Param("example") SysRoleExample example);

    int updateByExample(@Param("record") SysRole record, @Param("example") SysRoleExample example);

    int updateByPrimaryKeySelective(SysRole record);

    int updateByPrimaryKeyWithBLOBs(SysRole record);

    int updateByPrimaryKey(SysRole record);
    
    int updateByRoleId(Integer StaffId,Integer roleId);
    
    /**
    * @Description删除角色相关power
    * @Param
    * @Return
    **/
    int delRolePower(Integer id);
    
    /**
    * @Description 删除员工角色
    * @Param [id]
    * @Return int
    **/
    int updateStaffRole(Integer id);
    
    /**
    * @Description设置角色权限
    * @Param
    * @Return
    **/
    int insertRolePower(Integer roleId,Integer powerId);
}